From 444c98e4a7412604d82a308c81b91961e32dbf59 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 27 Feb 2006 17:55:22 +0100 Subject: [PATCH] Check feature flag supervisor_mode_kernel in dom0 builder. Signed-off-by: Keir Fraser --- xen/arch/x86/domain_build.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index 361ca2485e..f60ac47fc6 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -802,6 +802,14 @@ int construct_dom0(struct domain *d, v->arch.guest_context.user_regs.fs &= ~3; v->arch.guest_context.user_regs.gs &= ~3; printk("Dom0 runs in ring 0 (supervisor mode)\n"); + if ( !test_bit(XENFEAT_supervisor_mode_kernel, + dom0_features_supported) ) + panic("Dom0 does not support supervisor-mode execution\n"); + } + else + { + if ( test_bit(XENFEAT_supervisor_mode_kernel, dom0_features_required) ) + panic("Dom0 requires supervisor-mode execution\n"); } rc = 0; -- 2.30.2